#ifndef __SPINLOCK__
#define __SPINLOCK__

#ifndef __ASSEMBLER__
#include <stdint.h>

typedef volatile uint32_t spinlock_t;
#define SPINLOCK_INITVAL    (0)

void spin_lock(spinlock_t* lock);
void spin_unlock(spinlock_t* lock);

#endif

#endif /* __SPINLOCK__ */
